package Day08_17;

import java.io.FileWriter;
import java.io.IOException;

public class Test_FileWriter {
    public static void main(String[] args) {
        FileWriter fw = null;

        try {
            fw = new FileWriter("myFile",true);
            char[] chars = {'我','是','你','吧','吧'};
            fw.write(chars);
            fw.close();

        } catch (IOException e) {
            throw new RuntimeException(e);
        }finally {
            if(fw != null){
                try {
                    fw.close();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
        }

    }
}
